﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace Hicap.AuthorizationServer.Migrations
{
    public partial class Fix02 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "UserRoleRelated");

            migrationBuilder.DropColumn(
                name: "TenantName",
                table: "UserRoleRelated");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "User");

            migrationBuilder.DropColumn(
                name: "TenantName",
                table: "User");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "Role");

            migrationBuilder.DropColumn(
                name: "TenantName",
                table: "Role");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "Company");

            migrationBuilder.DropColumn(
                name: "TenantName",
                table: "Company");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "AuthObjectRoleRelated");

            migrationBuilder.DropColumn(
                name: "TenantName",
                table: "AuthObjectRoleRelated");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "AuthObject");

            migrationBuilder.DropColumn(
                name: "TenantName",
                table: "AuthObject");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "UserRoleRelated",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "TenantName",
                table: "UserRoleRelated",
                maxLength: 48,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "User",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "TenantName",
                table: "User",
                maxLength: 48,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "Role",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "TenantName",
                table: "Role",
                maxLength: 48,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "Company",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "TenantName",
                table: "Company",
                maxLength: 48,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "AuthObjectRoleRelated",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "TenantName",
                table: "AuthObjectRoleRelated",
                maxLength: 48,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "TenantId",
                table: "AuthObject",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "TenantName",
                table: "AuthObject",
                maxLength: 48,
                nullable: true);
        }
    }
}